package com.zmn.oms.services.interfaces.order;

import com.zmn.oms.model.dto.order.OrderOperationFailMessage;
import com.zmn.oms.model.dto.order.OrderOperationInstructionMessage;
import com.zmn.oms.model.dto.order.create.CreateOrderFailMessage;
import com.zmn.oms.model.entity.work.OrderWorkLogChange;
import org.springframework.scheduling.annotation.Async;

/**
 * 类描述：订单改变
 *
 * @author lujia
 * @date 2018/11/30 21:08
 */
public interface OrderChangeService {

    // @Async
    // void change(Long orderId);

    @Async
    void changeSyncToMos(Long orderId);


    /**
     *
     * @param orderId 订单号
     * @param delayTime 延迟时间 毫秒
     */
    @Async
    void changeSyncDelayToMos(Long orderId, long delayTime);

    // @Async
    // void change(List<Long> orderIdList);

    /**
     * 订单变更，同步保险数据处理
     * @param orderWorkLogChange
     */
    @Async
    void changeOfInsOrder(OrderWorkLogChange orderWorkLogChange);

    /**
     * 订单状态变更同步
     * @param orderWorkLogChange
     */
    @Async
    void changeStatusSync(OrderWorkLogChange orderWorkLogChange);

    /**
     * 新接口状态同步
     * @param orderWorkLogChange
     */
    @Async
    void changeStatusSyncToApi(OrderWorkLogChange orderWorkLogChange);

    /**
     * 新单同步
     * @param orderWorkLogChange
     */
    @Async
    void newOrderSync(OrderWorkLogChange orderWorkLogChange);

    /**
     * 新单同步
     * @param orderWorkLogChange
     */
    @Async
    void newOrderSyncToApi(OrderWorkLogChange orderWorkLogChange);

    /**
     * 新委托单同步
     * @param orderWorkLogChange
     */
    @Async
    void newEntrustOrderSyncToApi(OrderWorkLogChange orderWorkLogChange);

    /**
     * 订单状态变更同步给58
     * @param orderWorkLogChange
     */
    @Async
    void changeStatusSyncTo58(OrderWorkLogChange orderWorkLogChange);

    /**
     * 订单状态变更同步给上传中心
     * @param orderId
     */
    @Async
    void changeStatusSyncToUploadIASC(Long orderId, Integer logType);

    /**
     * 订单创建失败
     * @param createOrderFailMessage
     */
    @Async
    void orderCreateFailSyncToApi(CreateOrderFailMessage createOrderFailMessage);

    /**
     * 订单操作失败
     * @param orderOperationFailMessage
     */
    @Async
    void orderOperationFailSyncToApi(OrderOperationFailMessage orderOperationFailMessage);

    /**
     * 订单操作指令发布
     * @param orderOperationInstructionMessage
     */
    @Async
    void orderOperationInstructionToApi(OrderOperationInstructionMessage orderOperationInstructionMessage);
}
